package com.qire.manhua.dialog;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;

import com.qire.common.support.base.BaseDialog;
import com.qire.common.utils.OSUtil;
import com.qire.manhua.R;
import com.qire.manhua.databinding.DialogSystemPushDisablePromptBinding;

import androidx.annotation.NonNull;

/**
 * 系统推送设置被禁用提示对话框：在消息设置页中检测到设置未开启时显示
 */
public class SystemPushDisablePromptDialog extends BaseDialog {

    private final DialogSystemPushDisablePromptBinding viewDataBinder;

    public SystemPushDisablePromptDialog(@NonNull Context context) {
        super(context, R.style.CustomDialog_Translucent);

        viewDataBinder = DialogSystemPushDisablePromptBinding.inflate(LayoutInflater.from(context));
        viewDataBinder.setSystemPushDisablePromptDialog(this);

        setContentView(viewDataBinder.getRoot());
    }

    public void gotoSettingOnClick(View view) {
        dismiss();
        OSUtil.launchSettingPanel(view.getContext());
    }

    public void closeBtnOnClick(View view) {
        dismiss();
    }

}
